import request from "@/utils/request";

/**
 * 带条件查询订单数据
 * @returns {*}
 */
export function  QueryOrderDataWithConditions(orderDTO) {
  return request({
    url: "/pd-oms/order/QueryOrderDataWithConditions",
    method: "post",
    data:orderDTO
  });
}

/**
 * 修改订单信息
 * @returns {*}
 */
export function  updateOrderInfo(orderVo) {
  return request({
    url: "/pd-oms/order/updateOrderInfo",
    method: "post",
    data:orderVo
  });
}

/**
 * 根据订单id查订单详情
 * @param id
 * @returns {*}
 */
export function  CheckTheOrderBasedOnTheId(id) {
  return request({
    url: "/pd-oms/order/CheckTheOrderBasedOnTheId?id="+id,
    method: "post",
    data: id
  })
}

/**
 * 根据省份id查城市
 * @param id
 * @returns {*}
 */
export function  handleProvinceChange(id) {
  return request({
    url: "/pd-base/addressCollection/provincialInspectionCity?id="+id,
    method: "post",
    data: id
  })
}

/**
 * 根据城市id查区县
 * @param id
 * @returns {*}
 */
export function  handleCityChange(id) {
  return request({
    url: "/pd-base/addressCollection/shichaDistrict?id="+id,
    method: "post",
    data: id
  })
}

/**
 * 获取所有省份信息
 * @returns {*}
 */
export function  handleAllProvinces() {
  return request({
    url: "/pd-base/addressCollection/queryAllProvinces",
    method: "get",
  });
}

/**
 * 计算货物运费
 * @returns {*}
 */
export function  CalculateFreightChargesForGoods(orderVo) {
  return request({
    url: "/pd-oms/order/CalculateFreightChargesForGoods",
    method: "post",
    data:orderVo
  });
}
